/**
 * @file setting_keypad.h
 *
 */
#ifndef SETTING_KEYPAD_H
#define SETTING_KEYPAD_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#if USE_LV_WATCH_KEYPAD != 0

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/
typedef void (*KEYPAD_GET_TEXT_CB)(char * text); /* text is freed by user */

typedef struct {
    char * text;              /* not freed by key pad */
    bool password_mode;
    uint32_t max_length;
    uint32_t min_length;      /* invalid ok btn if the length of text on ta < min_length */
    KEYPAD_GET_TEXT_CB func; /* for getting the input text */
} keypad_para_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
void keypad_create_btn_action(keypad_para_t * param); /* param is not freed by key pad */

/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_KEYPAD*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*SETTING_KEYPAD_H*/
